# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=rancher-cli
pkgver=2.6.5
pkgrel=0
pkgdesc="The Rancher CLI"
url="https://www.rancher.com/"
arch="all"
license="Apache-2.0"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/rancher/cli/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/cli-$pkgver"

build() {
	go build -v -o bin/rancher -ldflags "-X main.VERSION=v$pkgver"
}

check() {
	go test ./...
}

package() {
	install -Dm755 bin/rancher -t "$pkgdir"/usr/bin
}

sha512sums="
fcd8e3a4430399526fb107aaedade00cc971cd7df85c46e1a10a662f14c607bc14a9ccf25912e33d55b5bdeff2cb5ab9d2a80e021111e68614ca15854c804b9f  rancher-cli-2.6.5.tar.gz
"
